#ifndef _INTERFACE_BACKEND_H
#define _INTERFACE_BACKEND_H

#include <QObject>
#include <QWidget>
#include <QDebug>

#include "Backend/visualrobot.h"
#include "_Interface/_Datastruct.h"

class BackendInterface : public QWidget{
    Q_OBJECT
public:
    BackendInterface(){}
    ~BackendInterface(){}

public:
    visualRobot* pvisualRobot;
    ST_FnBtn stFnBtn;
    ST_DirectionBtn stDirectionBtn;
    ST_SystemBtn stSystemBtn;
    ST_OperationInfo stOperationInfo;

public:
    virtual void FastTimerLoop() = 0;
    virtual void SlowTimerLoop() = 0;

public:

    virtual bool onbtnclicked_vPower() = 0;
    virtual bool onbtnclicked_ESTOP_Clicked() = 0;

    virtual bool onbtnclicked_Pause() = 0;
    virtual bool onbtnclicked_Run() = 0;
    virtual bool onbtnclicked_Stop() = 0;

    virtual void onbtnclicked_fn1() = 0;
    virtual void onbtnclicked_fn2() = 0;
    virtual void onbtnclicked_fn3() = 0;
    virtual void onbtnclicked_fn4() = 0;

    virtual void onbtnpressed_XP() = 0;
    virtual void onbtnpressed_YP() = 0;
    virtual void onbtnpressed_ZP() = 0;
    virtual void onbtnpressed_AP() = 0;
    virtual void onbtnpressed_BP() = 0;
    virtual void onbtnpressed_CP() = 0;

    virtual void onbtnpressed_XN() = 0;
    virtual void onbtnpressed_YN() = 0;
    virtual void onbtnpressed_ZN() = 0;
    virtual void onbtnpressed_AN() = 0;
    virtual void onbtnpressed_BN() = 0;
    virtual void onbtnpressed_CN() = 0;

    virtual void onbtnpressed_E1P() = 0;
    virtual void onbtnpressed_E2P() = 0;
    virtual void onbtnpressed_E1N() = 0;
    virtual void onbtnpressed_E2N() = 0;

    virtual void onbtnreleased_XP() = 0;
    virtual void onbtnreleased_YP() = 0;
    virtual void onbtnreleased_ZP() = 0;
    virtual void onbtnreleased_AP() = 0;
    virtual void onbtnreleased_BP() = 0;
    virtual void onbtnreleased_CP() = 0;

    virtual void onbtnreleased_XN() = 0;
    virtual void onbtnreleased_YN() = 0;
    virtual void onbtnreleased_ZN() = 0;
    virtual void onbtnreleased_AN() = 0;
    virtual void onbtnreleased_BN() = 0;
    virtual void onbtnreleased_CN() = 0;

    virtual void onbtnreleased_E1P() = 0;
    virtual void onbtnreleased_E2P() = 0;
    virtual void onbtnreleased_E1N() = 0;
    virtual void onbtnreleased_E2N() = 0;

    virtual void onbtnclicked_MannualOverrideP(double& value) = 0;
    virtual void onbtnclicked_ProgramOverrideP(double& value) = 0;

    virtual void onbtnclicked_MannualOverrideN(double& value) = 0;
    virtual void onbtnclicked_ProgramOverrideN(double& value) = 0;

    virtual void fromBackendMessageCommand(QByteArray Data) = 0;
    virtual void toBackendMessage(QByteArray& Data) = 0;
};

#endif // _INTERFACE_BACKEND_H
